5.3.3 APPX Application Design Manual

+ Chapter 1-1: Overview of Application Design
+ Chapter 1-2: Getting Started
+ Chapter 1-3: Data Dictionary
+ Chapter 1-4: Understanding Process Design
+ Chapter 1-5: Interprocess Communication
+ Chapter 1-6: Customizing Your Application
+ Chapter 1-7: The Documentation Facility
+ Chapter 1-8: Application Design Tools
- Chapter 2-1: Data Dictionary Overview
+ Chapter 2-2: Data Dictionary Concepts
+ Chapter 2-3: Domains
+ Chapter 2-4: Files and Fields
+ Chapter 2-5: Work Fields
+ Chapter 3-1: Overview of APPX Processes
+ Chapter 3-2: Getting Started
+ Chapter 3-3: Process Definition
+ Chapter 3-4: Menu Processes
+ Chapter 3-5: Job Processes
+ Chapter 3-6: Input Processes
+ Chapter 3-7: Output Processes
+ Chapter 3-8: Update Processes
+ Chapter 3-9: Query Processes
+ Chapter 3-10: Inquiry Processes
+ Chapter 3-11: Status Processes
+ Chapter 3-12: Subroutine Processes
+ Chapter 3-13: Table Processes
+ Chapter 3-14: Automatic and Optional Children
+ Chapter 3-15: Using the Image Editor
+ Chapter 3-16: Using GUI Features of the Image Editor
+ Chapter 3-17: Using Event Points
+ Chapter 4-1: ILF Integration
+ Chapter 4-2: True/False Status Indicators
+ Chapter 4-3: Specifying Statements
+ Chapter 4-4: The ILF Editor
+ Chapter 4-5: The Appx ILF Debugger
+ Chapter 4-6: ILF Keyword Reference
+ Chapter 4-7: Predefined Fields
+ Chapter 4-8: Runtime Subroutine's and Predefined Processes
+ Chapter 4-9: Appx Chart Director API

Chapter 2-1: Data Dictionary Overview

File Organization


APPX supports three types of file organization: one-record, consecutive, and indexed. The type of file organization you select affects performance, space requirements, and the procedures you can perform with regard to a file.

If a file is used as a process control file (PCF), this specification affects the operation of a related process. If a file is one-record, APPX completes one process cycle during process execution; in other words, APPX sequentially executes the frames for a process once and then ends. If the file is other than one-record, the process continues to execute until the application user chooses to end it. Refer to Overview of APPX Processes for additional information on PCFs and process cycles.

File organization is the only specification that affects record formats that are not stored in a file. If an unstored record is used as a PCF, the value you enter determines whether or not a process executes a single process cycle.

The following material is intended to help you choose the best type of organization for each file. The attributes of each type of organization are summarized in the following table.

Attribute

One-Record

Consecutive

Indexed

Can Delete Records?

No

No

Yes

Retrieval Method

Not Applicable

Position in File

Key Path

Relative Performance

Faster

Faster

Slower

Process Control File

One Process Cycle

Multiple Cycles

Multiple Cycles

A Comparison of File Organization

A one-record file is stored sequentially and therefore is subject to all the restrictions that apply to consecutive files. Unlike other consecutive files, however, a one-record file communicates a significant piece of information to an APPX input process; a process can expect at most one record. Based upon this information, the process simplifies development and maintenance requirements. APPX automatically checks for the existence of a record in the file. If there is no record, APPX places the user in add mode. If there is a record in the file, APPX places the user in change mode.

A parameters file is an example of a one-record file. Use of a one-record file to hold specifications that are referenced by more than one process in an application avoids unnecessary duplication, and simplifies design and maintenance.

Consecutive files organize records according to the sequence in which they are added to a file; each new record is added to the end of a file. The system retrieves records based upon their relative position in a sequence, or record number. A consecutive file does not contain keys, so its records cannot be retrieved by key path. To select a record based upon field value, APPX must process all records, ignoring those that do not satisfy selection requirements.

Because file processing is generally based on the value contained in a specific field (such as the last name of a customer or the number assigned to a vendor), APPX must use a query process to resequence consecutive records by the order they should be processed in. A query maintains the generated sequence in a pointer file. Forexample, the pointer file for an Orders file that is sorted alphabetically by customer includes the following record sequence for the customers (Anderson?s record is number 8, Jones? is 4, Smith?s is 1, and Williams? record is 22). To print an alphabetically sorted list of outstanding orders, the system consults the pointer file, and the records are processed in the following order: 8 (Anderson), 4 (Jones), 1 (Smith), and 22 (Williams). Refer to the Query Files section and the Child Use Query Option for more information about pointer files in a query process.

On most systems, APPX retrieves records from consecutive files faster than from indexed files.

A consecutive file can contain an unlimited number of records, subject only to operating system limitations and available storage space. You cannot, however, delete specific records in this type of file. To eliminate specific records, you must first transfer all records that you want retained to another file, and then scratch the original file.

For an indexed file, the system retrieves records based on the content of specified fields, or primary and alternate keys. APPX requires one primary key field for each file, and permits up to 16 alternate keys. These key fields are identified in the field specifications screens in the data dictionary.

Key fields, when used by the system to retrieve records, are referred to as key paths. This method of record retrieval is inherently slower than the method employed for consecutive files, but is more flexible and allows you to perform complicated operations more efficiently. Performance is enhanced when records are retrieved by primary (as opposed to alternate) key paths, although indexed file retrieval is still slower than consecutive file retrieval.

An indexed file can contain an unlimited number of records, subject only to the operating system?s limitations, the restrictions that are imposed by the length of a key field, and the available storage space. Unlike records in a consecutive or one-record file, records in indexed files can be deleted.

 

Application Design Manual                                         "Powered by Appx Software"

129

©2006 By APPX Software, Inc. All Rights Reserved